﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wallpaper.Models.Interfaces;

namespace Wallpaper.Models.Entities
{
    /// <summary>
    /// 分类表
    /// </summary>
    public class Category : BaseEntity, IHasTimestamps, ISoftDelete
    {

        /// <summary>
        /// 分类名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 排序序号（数字越小越靠前）
        /// </summary>
        public int Sort { get; set; }


        public string CategorylUrl { get; set; }

        public bool IsDeleted { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }


        /// <summary>
        /// 该分类下的壁纸集合
        /// </summary>
        public virtual ICollection<Wallpapers> Wallpapers { get; set; } = new List<Wallpapers>();
    }
}
